# 在这里写上你的代码 :-)
from microbit import *


def REB_LED(red, green, blue, nms):
    i_red = red * 4
    i_green = green * 4
    i_blue = blue * 4
    pin0.write_analog(i_red)
    pin1.write_analog(i_green)
    pin2.write_analog(i_blue)
    sleep(nms)


while True:
    REB_LED(255, 255, 255, 3000)
    REB_LED(255, 0, 0, 500)
    REB_LED(0, 255, 0, 500)
    REB_LED(0, 0, 255, 500)
    REB_LED(255, 255, 128, 500)
